import { axios } from '@/utils/request'

/**
 * 获取选课基础信息
 *
 */
export function getCourseSelectionBaseInfo (parameter) {
  return axios({
    url: '/courseSelection/getBaseInfo',
    method: 'post',
    data: parameter
  })
}

/**
 * 获取选课内容信息
 *
 */
export function getCourseSelectionCryInfo (parameter) {
  return axios({
    url: '/courseSelection/getCryInfo',
    method: 'post',
    data: parameter
  })
}

/**
 * 添加选课信息
 *
 */
export function toCourseSelection (parameter) {
  return axios({
    url: '/courseSelection/toSelection',
    method: 'post',
    data: parameter
  })
}

/**
 * 取消选课信息
 *
 */
export function cancelCourseSelection (parameter) {
  return axios({
    url: '/courseSelection/cancelSelection',
    method: 'post',
    data: parameter
  })
}

/**
 * 校验选课
 *
 */
export function checkCourseSelection (parameter) {
  return axios({
    url: '/courseSelection/check',
    method: 'post',
    data: parameter
  })
}

/**
 * 清空实验选课
 *
 */
export function emptyCourseSelection (parameter) {
  return axios({
    url: '/courseSelection/emptySelection',
    method: 'post',
    data: parameter
  })
}


/**
 * 选课详情
 *
 */
export function getCourseSelectionDetailList (parameter) {
  return axios({
    url: '/courseSelection/getCsDetailList',
    method: 'post',
    data: parameter
  })
}

/**
 * 导出实验选课
 *
 */
export function exportCourseSelectionDetailList (parameter) {
  return axios({
    url: '/courseSelection/exportCsDetailList',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}

/**
 * 导出课表
 *
 */
export function exportSelection (parameter) {
  return axios({
    url: '/courseSelection/exportSelection',
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}



/**
 * 学生选课列表
 *
 */
export function getCourseSelectionStudentList (parameter) {
  return axios({
    url: '/courseSelection/getCsStuList',
    method: 'post',
    data: parameter
  })
}


/**
 * 学生开课列表
 *
 */
export function getCoursePublishStudentList (parameter) {
  return axios({
    url: '/courseSelection/getCpStuList',
    method: 'post',
    data: parameter
  })
}